- page_title "分支"
= render "projects/commits/header_title"
= render "projects/commits/head"
.row-content-block
  .pull-right
    - if can? current_user, :push_code, @project
      = link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do
        = icon('plus')
        新分支
      &nbsp;
    .dropdown.inline
      %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
        %span.light
        - if params[:sort] == 'recently_updated'
          = sort_title_recently_updated
        - elsif params[:sort] == 'last_updated'
          = sort_title_oldest_updated
        - else
          名称
        %b.caret
      %ul.dropdown-menu.dropdown-menu-align-right
        %li
          = link_to namespace_project_branches_path(sort: nil) do
            名称
          = link_to namespace_project_branches_path(sort: 'recently_updated') do
            = sort_title_recently_updated
          = link_to namespace_project_branches_path(sort: 'last_updated') do
            = sort_title_oldest_updated
  .oneline
    在项目设置中保护的分支无法被合并
- unless @branches.empty?
  %ul.content-list.all-branches
    - @branches.each do |branch|
      = render "projects/branches/branch", branch: branch
  = paginate @branches, theme: 'gitlab'
